package com.iqik.base.base;

public class Demo {
    private int privateA = 1;
    public int publicA = 2;
    protected int protectedA = 3;
    int defaultA = 4;

    private void privateMethod() {
        System.out.println("private method");
    }

    public void publicMethod() {
        System.out.println("public method");
    }

    protected void protectedMethod() {
        System.out.println("protected method");
    }

    void defaultMethod() {
        System.out.println("default method");
    }

    public static void main(String[] args) {

        Demo demo = new Demo();
        int protectedA = demo.protectedA;
        System.out.println(protectedA);

        I1 i1 = new I1() {
            @Override
            public void me() {

            }
        };
    }

    interface I1 {
        void me();
    }

    class Demo2 {
        void demo1(){

        }
    }

    abstract class Demo3 extends Demo2 implements I1 {
        public void m1(){
            System.out.println("method m1");
        }

    }
}

class A {

}